import sys
import re
import subprocess
import os
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtWebEngineWidgets import *



class MainWindow(QMainWindow):
    def __init__(self):
        url_father = os.path.dirname(os.path.abspath(__file__))
        url=""
        for i in url_father:
            if(i == "\\"):
                url = url + "/"
            else:
                url = url + i
        super(MainWindow,self).__init__()
        self.setWindowTitle('画板')
        self.resize(830,570)
        self.browser=QWebEngineView()
        self.browser.load(QUrl(url+'/template/draw.html'))
        print(url+'/template/draw.html')
        self.setCentralWidget(self.browser)

# if __name__ == '__main__':
#     app = QApplication(sys.argv)
#     win=MainWindow()
#     win.show()
#     sys.exit(app.exec_())
